package com.net.xpay.core.dao;

import com.net.xpay.core.domain.AccountLog;
import com.net.xpay.core.model.AccountLogSearchModel;
import com.net.common.dao.Page;
import com.net.common.dao.PagedMapper;
import com.net.common.annotation.DataShard;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@DataShard("")
@Repository
public interface AccountLogMapper extends PagedMapper<Long, AccountLog> {
    List<AccountLog> search(@Param("searchModel") AccountLogSearchModel searchModel, @Param("page") Page page);

    long searchCount(@Param("searchModel") AccountLogSearchModel searchModel);

    List<AccountLog> list(@Param("searchModel") AccountLogSearchModel searchModel);

    long sumAccountLog(@Param("searchModel")AccountLogSearchModel searchModel);

    long sumLastAfterAmountByTime(@Param("minCreateTime")LocalDateTime minCreateTime, @Param("maxCreateTime") LocalDateTime maxCreateTime);

    long sumFirstBeforeAmountByTime(@Param("minCreateTime")LocalDateTime minCreateTime, @Param("maxCreateTime") LocalDateTime maxCreateTime);
}
